[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CHR(IEXP) (STRING)

 Function
  Converts an ASCII code (0-255) to a character.

 Syntax
  CHR(iexp)

   iexp = Any integer expression between 0 and 255.

 Return Type & Value
  STRING
  Returns a one character long string for ASCII codes from
  1 to 255 or an empty string for ASCII code 0.

 Remarks
  In other languages (such as BASIC) you can have any of the 256 possible
  ASCII codes (0-255) in a string.  In PPL you are limited to 255 codes (1-
  255) because ASCII 0 is used to terminate strings and can't appear in the
  middle of a string.  So, if you ever get an empty string from this
  function, it is because you passed it a 0.  Any other value will return
  a valid string with a single character.

 Examples
  PRINTLN "The ASCII code for S is ",ASC("S")
  ' Convert a lowercase s to uppercase
  STRING s
  LET s = CHR(ASC("s")-ASC("a")+ASC("A"))

See Also: ASC()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson